package com.ll.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ll.common.utils.PageUtils;
import com.ll.gulimall.member.entity.MemberEntity;
import com.ll.gulimall.member.exception.CheckPhoneExistExecption;
import com.ll.gulimall.member.exception.CheckUserNameExistException;
import com.ll.gulimall.member.vo.UserLoginVo;
import com.ll.gulimall.member.vo.UserRegistVo;
import com.ll.gulimall.member.vo.WeiBoResVo;

import java.util.Map;

/**
 * 会员
 *
 * @author liliang
 * @email liliang@gmail.com
 * @date 2020-07-31 00:43:47
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 注册
     *
     * @param vo
     */
    void regist(UserRegistVo vo);


    /**
     * @param username
     * @throws CheckUserNameExistException username不唯一异常
     */
    void checkUserNameUnique(String username) throws CheckUserNameExistException;

    /**
     *
     * @param phone
     * @throws CheckPhoneExistExecption 手机号不唯一异常
     */
    void checkPhoneUnique(String phone) throws CheckPhoneExistExecption;

    MemberEntity login(UserLoginVo loginVo);

    /*
    微博登录
     */
    MemberEntity login(WeiBoResVo weiBoResVo) throws Exception;
}

